package com.ly.heart.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import com.ly.common.utils.DateUtils;
import com.ly.heart.mapper.OfficeSuppliesDetailMapper;
import com.ly.heart.service.IOfficeSuppliesDetailService;
import org.springframework.stereotype.Service;
import com.ly.heart.domain.OfficeSuppliesDetailEntity;

import javax.annotation.Resource;


/**
 * 办公用品操作明细Service业务层处理
 *
 * @author cxl
 * @date 2024-06-09
 */
@Service
public class OfficeSuppliesDetailServiceImpl extends ServiceImpl<OfficeSuppliesDetailMapper,OfficeSuppliesDetailEntity> implements IOfficeSuppliesDetailService {

    @Resource
    private OfficeSuppliesDetailMapper officeSuppliesDetailMapper;

    /**
     * 查询办公用品操作明细
     *
     * @param id 办公用品操作明细ID
     * @return 办公用品操作明细
     */
    @Override
    public OfficeSuppliesDetailEntity selectOfficeSuppliesDetailEntityById(String id)
    {
        return officeSuppliesDetailMapper.selectOfficeSuppliesDetailEntityById(id);
    }

    /**
     * 查询办公用品操作明细列表
     *
     * @param officeSuppliesDetailEntity 办公用品操作明细
     * @return 办公用品操作明细
     */
    @Override
    public List<OfficeSuppliesDetailEntity> selectOfficeSuppliesDetailEntityList(OfficeSuppliesDetailEntity officeSuppliesDetailEntity)
    {
        return officeSuppliesDetailMapper.selectOfficeSuppliesDetailEntityList(officeSuppliesDetailEntity);
    }

    /**
     * 新增办公用品操作明细
     *
     * @param officeSuppliesDetailEntity 办公用品操作明细
     * @return 结果
     */
    @Override
    public int insertOfficeSuppliesDetailEntity(OfficeSuppliesDetailEntity officeSuppliesDetailEntity)
    {
        officeSuppliesDetailEntity.setCreateTime(DateUtils.getNowDate());
        return officeSuppliesDetailMapper.insertOfficeSuppliesDetailEntity(officeSuppliesDetailEntity);
    }

    /**
     * 修改办公用品操作明细
     *
     * @param officeSuppliesDetailEntity 办公用品操作明细
     * @return 结果
     */
    @Override
    public int updateOfficeSuppliesDetailEntity(OfficeSuppliesDetailEntity officeSuppliesDetailEntity)
    {
        return officeSuppliesDetailMapper.updateOfficeSuppliesDetailEntity(officeSuppliesDetailEntity);
    }

    /**
     * 批量删除办公用品操作明细
     *
     * @param ids 需要删除的办公用品操作明细ID
     * @return 结果
     */
    @Override
    public int deleteOfficeSuppliesDetailEntityByIds(String[] ids)
    {
        return officeSuppliesDetailMapper.deleteOfficeSuppliesDetailEntityByIds(ids);
    }

    /**
     * 删除办公用品操作明细信息
     *
     * @param id 办公用品操作明细ID
     * @return 结果
     */
    @Override
    public int deleteOfficeSuppliesDetailEntityById(String id)
    {
        return officeSuppliesDetailMapper.deleteOfficeSuppliesDetailEntityById(id);
    }

}
